﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                assembly="KuaJing.Orders"
				        namespace="KuaJing.Orders.Domain">

  <class name="ExportContract" table="Orders_ExportContract">
    <id name="Id" access="field.camelcase" type="Int32" column="ExportContractId">
      <generator class="native" />
    </id>
    <version name="Version" access="field.camelcase" />

    <property name="Supplier" />
    <property name="Purchaser" />
    <property name="DestinationPort" />
    <property name="PriceClause" />
    <property name="SettlementMethod" />
    <property name="Currency" />
    <property name="Amount" />
    <set name="Goodses" table="Orders_ExportContract_ShipperGoods" cascade="none">
      <key column="ExportContractId" foreign-key="FK_ExportContract_ShipperGoods" />
      <many-to-many class="KuaJing.Commodity.Domain.ShipperGoods,KuaJing.Commodity" 
                    column="ShipperGoodsId" foreign-key="FK_Goods_ExportContract" />
    </set>
    <property name="CreatedTime" access="field.camelcase" />
    <property name="CreatedUserName" access="field.camelcase" />
    <property name="ModifiedTime" access="field.camelcase" />
    <property name="ModifiedUserName" access="field.camelcase" />
    <property name="AccessedTime" access="field.camelcase" />
    <property name="AccessedUserName" access="field.camelcase" />
    <property name="Memo" />
    <property name="IsInvalid" />
  </class>
</hibernate-mapping>
